package com.prdownloader.internal;


import com.prdownloader.Response;
import com.prdownloader.request.DownloadRequest;


public class SynchronousCall {
    /**
     * 下载请求
     */
    public final DownloadRequest request;

    /**
     * 同步请求
     *
     * @param request
     */
    public SynchronousCall(DownloadRequest request) {
        this.request = request;
    }

    /**
     * 获取请求Response
     *
     * @return Response
     */
    public Response execute() {
        DownloadTask downloadTask = DownloadTask.create(request);
        return downloadTask.run();
    }

}
